<ion-view view-title="我的求购" class="mypbuy">
    <ion-content>
    	<div class="list">
    		 <li class="item item-input">
    		 	<span class="input-label">求购标题：</span>
    		 	<input type="text" placeholder="请输入求购标题"  ng-model="input.title"/>
    		 </li>
    		  <!--<li class="item item-input">
    		 	<span class="input-label">开始时间：</span>
    		 	<input type="date"  />
    		 </li>-->
    		   <li class="item item-input" ion-datetime-picker title="'请输结束时间'" ng-model="input.end_time">
    		 	<span class="input-label">结束时间：</span>
    		 	<!--<input type="date"  ng-model="input.end_time"/>-->
    		 	<input type="text" placeholder="请输入开始时间" class="timeLight" ng-class="{'timeNoneInfo':input.end_time}">{{input.end_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
    		 </li>
			 <div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
					<div class="input-label">收货地址：</div>
					<div class="input-value" ng-click="doSelectAddress()">{{input.address_select.name}}</div>
				</div>
    		 <li class="item item-toggle">
			能否索要发票：
			 <label class="toggle toggle-positive">
             <input type="checkbox"  ng-model="input.invoice_type3">
             <div class="track">
               <div class="handle"></div>
             </div>
           </label>
		  </li>
		   <!--<ion-radio   value="增值税专用发票">增值税专用发票</ion-radio>
		   <ion-radio   value="增值税专用发票">增值税专用发票</ion-radio>-->
		  <div ng-show="input.invoice_type3"> <!--当确认索要发票时，才显示-->
    		  <li class="item item-input-inset" style="padding-bottom: 0;">
    		 	发票要求：
    		 	<label class="checkbox checkbox-square padding-0">
    		 		<input type="checkbox" ng-model="input.invoice_type1" id="add_fp" />
    		 	</label><label for="add_fp">增值税专用发票</label>
    		 </li>
    		  <li class="item item-input-inset item-borderless">
    		   <span class="invisible">发货要求：</span>
    		 	<label class="checkbox checkbox-square padding-0">
    		 		<input type="checkbox" id="normal_fp" ng-model="input.invoice_type2"/>
    		 	</label><label for="normal_fp">增值税普通发票</label>
    		 </li>
    	</div>
    	<li class="item item-input">
    			<span class="input-label">联系方式：</span>
    			<input type="text" placeholder="请输入联系方式"  ng-model="input.phone"/>
    	</li>
    		  <li class="item item-input">
    		 	需求说明：
    		 	<textarea rows="3" placeholder="请输入求购详情" ng-model="input.memo"></textarea>
    		 </li>

    		  <li class="item item-divider item-icon-right">
    		  	求购商品
    		  	<i class="icon ion-plus-circled positive"></i>
    		  </li>
    		 <li class="item item-input">
    		 	<span class="input-label">商品名称：</span>
    		 	<input type="text" placeholder="请输入商品名称" ng-model="input.goods.name" />
			 </li>
			 <div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
					<div class="input-label">品牌：</div>
					<div class="input-value" ng-click="doSelectBrand()">{{input.brand.name}}</div>
				</div>
       	 <li class="item item-input">
			   品类：
			   <div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
			   <div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
			   <div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
       	 </li>
       	  <li class="item item-input">
    		 	<span class="input-label">采购量：</span>
    		 	<input type="text" placeholder="请输入商品采购量"  ng-model="input.goods.count" />
		</li>
		<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
				<div class="input-label">商品单位：</div>
				<div class="input-value" ng-click="doSelectAddress()">{{input.address_select.name}}</div>
			</div>
    		   <li class="item item-input">
    		 	商品描述：
    		 	<textarea rows="3" placeholder="请输入商品描述"  ng-model="input.goods.describe"></textarea>
    		 </li>
    		<li class="item item-input">
       	 	<span class="input-label">
       	 		商品图片：
       	 	</span>
           	<!--<a class="add input-file" href="javascript:void(0);"><span class="icon ion-plus"></span><input size="100" type="file"></a>-->
           	<div class="add input-file" on-tap="doShowFile()">
                    <span class="icon ion-plus"></span>
                </div>
                <input id="upfilebutton" type="file" multiple="multiple" accept="image/*" onchange="angular.element(this).scope().onupload(this)" style="display: none;" />
            </li>
            <li class="item padding-0">
                <div ng-repeat="img in input.uploads track by $index">
                    <div class="imageShow">
                        <i class="icon ion-close-circled delImage" on-tap="ondelete($index)"></i>
                        <img src="{{img}}">
                    </div>
                    <div ng-class="{'clear_zhang':($index+1)%4==0}"></div>
                </div>
            </li>
         </li>

    	</div>

     <div class="button-bar padding">
     	 <button class="button  button-assertive" >取消</button>
     	 <button class="button  button-positive col-offset-10" on_tap = "edit_data()">保存</button>
     </div>

    </ion-content>
</ion-view>